package dbmodels;

import java.util.UUID;

import dbtypes.PermisionAlbum;

public class Album {

	private UUID id;
	private UUID userid;
	private PermisionAlbum permision;
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public UUID getId() {
		return id;
	}

	public void setId(UUID id) {
		this.id = id;
	}

	public PermisionAlbum getPermision() {
		return permision;
	}

	public void setPermision(PermisionAlbum permision) {
		this.permision = permision;
	}

	public UUID getUserid() {
		return userid;
	}

	public void setUserid(UUID userid) {
		this.userid = userid;
	}
	
	public boolean isValid(){
		
		name = name == null ? "" : name;
		
		name = name.trim();
				
		if(name.equals(""))
			return false;
		
		if(permision == null)
			return false;
		
		if(userid == null)
			return false;
		
		if(id == null)
			return false;
		
		return true;
	}

}
